package com.boc.mainmodule.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.FrameLayout;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.boc.mainmodule.R;
import com.boc.mainmodule.R2;

import butterknife.BindView;
import demo.bocweb.com.sdk.base.fragment.BaseFragment;
import demo.bocweb.com.sdk.config.ARoutConfig;

/**
 * Created by zhelun on 2018/2/7.
 */
@Route(path = ARoutConfig.shoppingRootFragPath)
public class ShoppingRootFragment extends BaseFragment {
    @BindView(R2.id.fl_root)
    FrameLayout flRoot;

    @Override
    public void initUI(View view, @Nullable Bundle savedInstanceState) {
        Fragment shoppingFragment = (Fragment) ARouter.getInstance().build(ARoutConfig.shoppingPageFragmentPath).navigation();
        FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
        if (shoppingFragment != null) {
            transaction.add(R.id.fl_root, shoppingFragment).commit();

        }
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_root;
    }

}
